package demo.thread.pool2;

import java.util.List;

public class TaskThread extends Thread {

	private List<Integer> list;
	private Long subSum = 0L;

	public TaskThread() {

	}

	public TaskThread(List<Integer> subList) {
		this.list = subList;
	}

	public void run() {
		for (Integer var : list) {
			subSum += var;
		}
	}

	public Long getSubSum() {
		return subSum;
	}

	public void setSubList(List<Integer> subList) {
		this.list = subList;
	}

}
